package com.dm.cloud.images.service;

import com.github.dockerjava.api.DockerClient;
import com.dm.cloud.images.common.po.ImagesEndpoint;
import com.dm.cloud.images.mode.NodeInfo;
import com.dm.cloud.tkmybatis.service.BaseEntityService;
import com.dm.cloud.images.common.request.ImagesEndpointSearchRequest;

import java.util.List;

/**
   * @author hcx
   * @type ImagesEndpointService.java
   * @desc ImagesEndpoint service
   */
public interface ImagesEndpointService extends BaseEntityService<ImagesEndpointSearchRequest,ImagesEndpoint> {
    /**
     * 获取一个活跃的连接
     * @return
     */
    ImagesEndpoint findActiveLimit1();

    DockerClient getClientByNodeId(String nodeId);

    /**
     * 节点详情
     * @param nodeId
     * @return
     */
    NodeInfo nodeInfo(String nodeId);

    /**
     * 查询与应用相关的节点
     * @param appCode
     * @return
     */
    List<ImagesEndpoint> findByAppCode(String appCode);
}
